import React, { Component } from 'react'
import { connect } from 'react-redux'
import { getUserList } from '../../redux/userlist.redux'
import UserCard from '../usercard/usercard'
class Boss extends Component{

    componentDidMount(){
       this.props.getUserList("genius")
    }
    render(){    
        const dataList = this.props.userList
        return <UserCard dataList={dataList}></UserCard>          
    }
}

const mapStatetoProps =(state)=>{
  return state.userlist
}

const actionCreators = {getUserList}
Boss = connect(mapStatetoProps,actionCreators)(Boss)
export default Boss